<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: luanzg <782114271@qq.com>
// +----------------------------------------------------------------------
use think\facade\Route;
use app\common\middleware\Admin;

Route::post('login', 'Home/login')->allowCrossDomain(headers());
Route::post('uploadHead/:id','Home/upload')->allowCrossDomain(headers());

Route::group(function () {
    Route::get('authinfo', 'authInfo');
    Route::get('menus', 'ruleAdminAll');
    // 退出登录
    Route::post('loginOut', 'loginOut');
})->prefix('Home/')->allowCrossDomain(headers())->middleware(Admin::class);;
